<?php
session_start();
checkLoggedIn();
$userInfo = getUserInformation(getLoggedInUser());
print_r($userInfo);
?>
<div class="completionForm">
		<?php if($addionalInfoExists){ ?><h1>We're almost there. Please fill out the information below:</h1><?php } ?>
		<div id="formContainer">
			<form enctype="multipart/form-data" method="post" action="accountValidator.php" id="completionForm">
				<!-- USER NAME -->
				<fieldset>
					<legend>Name</legend>
					<label for="firstName">First Name:</label>
					<input id="firstName" name="firstName" type="text"/>
					<label for="secondName">Second Name:</label>
					<input id="secondName" name="secondName" type="text"><br>
					<label for="firstLastname">First Family Name:</label>
					<input id="firstLastname" name="firstLastname" type="text"/>
					<label for="secondLastname">Second Family Name:</label>
					<input id="secondLastname" name="secondLastname" type="text">
				</fieldset>
				<!-- ADDRESS UK ONLY-->
				<fieldset>
					<legend>Address</legend>
					<label for="postcode">Postcode:</label>
					<input type="text" name="postcode" id="postcode"/>
					<label for="address">Address: </label>
					<input type="text" name="address" id="address" />
				</fieldset>
				<!-- OPTIONAL INFO -->
				<fieldset>
					<legend>Additional Info</legend>
					<label for="gender">Gender:</label>
					<input type="radio" name="gender" id="genderM" value="1">Male</input>
					<input type="radio" name="gender" id="genderF" value="2">Female</input>
					<label for="dateOfBirth">Date of birth:</label>
					<input type="date" name="dateOfBirth" id="dateOfBirth"/>
				</fieldset>
				<!-- IMAGE -->
				<fieldset>
					<legend>Images</legend>
					<div id="primaryImagePreviewer">
					</div>
					<label for="primaryImage">Main Image: </label>
					<input id="primaryImage" name="primaryImage" type="file" accept="image/*" /> 
					<div id="secondaryImagePreviewer">
					</div>
					<label for="secondaryImage">Secondary Image: </label>
					<input id="secondaryImage" name="secondaryImage" type="file" accept="image/*" /> 
				</fieldset>
				<!-- SUBMIT -->
				<input type="hidden" value="completeRegistration" name="action" />
				<input type="submit" value="Finish registration" /> 
			</form>
		</div>
	</div>